package com.zhangc.blog.admin.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import com.zhangc.blog.admin.entity.UserEntity;
import com.zhangc.blog.admin.mapper.UserMapper;

/**
 * 功能描述:<br>
 *
 * @author wx:fdzhangc
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本] （可选）
 */
@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public void addUser(UserEntity userEntity) {
        userMapper.insertUser(userEntity);
    }

    public boolean updateUserInfo(UserEntity adminUser) {
        return SqlHelper.retBool(userMapper.updateById(adminUser));
    }
}
